﻿namespace Client.Forms
{
    static class WaitWin
    {
        static WaitForm form = null;

        public static void Show(string msg)
        {
            if (form == null)
            {
                form = new WaitForm();
                System.Threading.ThreadPool.QueueUserWorkItem(state =>
                {
                    form.ShowDialog();
                });
            }

            form.msg = msg;
        }
        public static void Close()
        {
            if (form != null)
                form.Close();
            form = null;
        }
    }
}
